using UnityEngine;

public class PlayerState_定身术 : PlayerStateBase
{
	private bool _成功释放;

	public override void OnEnter()
	{
		_Mono._Rb2D.velocity = Vector2.zero;
		_Mono._Ani.Play("定身术");
		_Timer = 0.35f;
		_NextState = StateType_Player.正常移动;
		_成功释放 = false;
		MonoSingleton<AudioManager>.Instance.F_Play_SFX(_Mono._AudioC_定身);
		_Mono._isOk_定身术 = false;
	}

	public override void OnExit()
	{
		if (_成功释放)
		{
			_Mono._定身目标?.F_定身(4.75f);
			_Mono._定身目标 = null;
		}
	}

	public override void OnUpdate()
	{
		_Timer -= Time.deltaTime;
		if (_Timer <= 0f)
		{
			_成功释放 = true;
			_Mono.ChangeState(_NextState);
		}
	}
}
